#include "HeadgenPPCallbacks.h"

#include <llvm/Support/raw_ostream.h>
#include <clang/Basic/FileManager.h>

HeadgenPPCallbacks::HeadgenPPCallbacks(HeaderInfoMap &headerInfoMap) :
	m_headerInfoMap(headerInfoMap)
{}

void HeadgenPPCallbacks::InclusionDirective(clang::SourceLocation HashLoc,
		const clang::Token &IncludeTok, llvm::StringRef FileName, bool IsAngled,
		const clang::FileEntry *File, clang::SourceLocation EndLoc) {
	std::string name = File->getName();
	m_headerInfoMap[name] = HeaderInfo(name, FileName.str(), IsAngled);
}
